package com.tsd.jxc.stock.service;

import com.tsd.core.vo.PageBean;
import com.tsd.jxc.stock.entity.JxcStockInventory;
import com.tsd.jxc.stock.entity.JxcStockInventoryExt;
import com.tsd.system.entity.SysUser;
import com.tsd.system.entity.SysUserExt;

import java.util.List;
import java.util.Map;

/**
 * 描述：JxcStockInventory服务实现层接口
 *
 * @author Hillpool
 * @date 2022/07/29 15:06:33
 */
public interface JxcStockInventoryService {

    /**
     * 描述：根据id获取JxcStockInventory
     *
     * @param id
     */
    JxcStockInventory getJxcStockInventoryById(Long id) throws Exception;

    /**
     * 描述：根据sid获取JxcStockInventory
     *
     * @param sid
     */
    JxcStockInventoryExt queryBySid(String sid) throws Exception;

    /**
     * 描述：根据sid列表删除JxcStockInventory
     *
     * @param list
     */
    void deleteJxcStockInventorys(List<String> list, SysUser opUser) throws Exception;

    /**
     * 描述：保存或更新JxcStockInventory
     *
     * @param record
     * @param opUser
     */
    void saveJxcStockInventory(JxcStockInventoryExt record, SysUser opUser) throws Exception;

    /**
     * 描述：根据params分页查询JxcStockInventory
     *
     * @param params
     * @param page
     */
    List<JxcStockInventoryExt> findJxcStockInventorys(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询JxcStockInventory
     *
     * @param params
     */
    List<JxcStockInventoryExt> findJxcStockInventorys(Map<String, Object> params) throws Exception;

    List<JxcStockInventoryExt> selectInventoryByPage(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：审核JxcStockInventory
     *
     * @param sid
     * @param opUser
     */
    void auditJxcStockInventory(List<String> sid, SysUser opUser, Integer state) throws Exception;

    void changeJxcStockInventoryAuditState(List<String> sidList, Integer state, SysUserExt opUser) throws Exception;

    void ReAuditJxcStockInventory(String sid, SysUser opUser, Integer state) throws Exception;

    void saveJxcStockInventory4Review(JxcStockInventoryExt inventoryExt, SysUser opUser) throws Exception;

    /**
     * 描述：更新库存
     *
     * @param inventoryExt
     * @param opUser
     */
    void saveJxcStockInventory4UpdateStock(JxcStockInventoryExt inventoryExt, SysUserExt opUser) throws Exception;

    List<JxcStockInventoryExt> queryJxcStockInventoryData4Print(List<String> sidList) throws Exception;

    /**
     * 描述：生成出入库单
     *
     * @param inventoryExt
     * @param opUser
     */
    void genJxcStockInventory4InOutBill(JxcStockInventoryExt inventoryExt, SysUserExt opUser) throws Exception;

}